package cn.bgs.controller;


import cn.bgs.common.R;
import cn.bgs.pojo.ComplaintsType;
import cn.bgs.service.IComplaintsTypeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 投诉类型表 前端控制器
 * </p>
 *
 * @author cf
 * @since 2022-06-07
 */
@RestController
@RequestMapping("/complaints-type")
public class ComplaintsTypeController {

    @Autowired
    private IComplaintsTypeService iComplaintsTypeService;


    @GetMapping("/appfindComplaint")
    @ApiOperation(value = "app投诉类型查询")
    public R appfindComplaint(){

        List<ComplaintsType> complaintsType = iComplaintsTypeService.appfindComplaint();
        if (complaintsType != null){
            return R.ok().data("complaintsType",complaintsType);
        }else {
            return R.error();
        }
    }
}
